import { App } from 'vue';
import { registerControlProvider } from '@ibiz-template/runtime';
import { CheckinMonthGrid } from './checkin-month-grid';
import { CheckinMonthGridProvider } from './checkin-month-grid.provider';
import { CheckInMonthGridColumn } from './components/checkin-month-grid-column';

export default {
  install(app: App) {
    // 全局注册表格插件组件
    app.component(CheckinMonthGrid.name!, CheckinMonthGrid);
    app.component(CheckInMonthGridColumn.name!, CheckInMonthGridColumn);
    // 全局注册表格插件适配器，GRID_RENDER是插件类型，checkin-month-grid是插件标识
    registerControlProvider(
      'GRID_RENDER_MONTH',
      () => new CheckinMonthGridProvider(),
    );
  },
};
